module(
    name = "toolchain_utils",
    version = "1.3.0",
    bazel_compatibility = [
        ">=7.1.0",
    ],
    compatibility_level = 1,
)

bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "bazel_features", version = "1.13.0")
bazel_dep(name = "platforms", version = "0.0.7")

bazel_dep(name = "pre-commit", version = "1.0.9", dev_dependency = True)
bazel_dep(name = "pre-commit-hooks", version = "1.3.1", dev_dependency = True)
bazel_dep(name = "rules_python", version = "1.0.0", dev_dependency = True)
bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.0", dev_dependency = True)

triplet = use_repo_rule("//toolchain/local/triplet:defs.bzl", "toolchain_local_triplet")

triplet(
    name = "local",
)

launcher = use_repo_rule("//toolchain/launcher:repository.bzl", "launcher")

launcher(
    name = "launcher",
)

python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
python.toolchain(
    # TODO: remove this when `ignore_root_user_error` is hermetic
    # https://github.com/bazelbuild/rules_python/issues/2016
    ignore_root_user_error = True,
    python_version = "3.13",
)
